﻿using Stee.CAP8.MessageBus.Sagas.Core.Messages;
using Stee.CAP8.MessageBus.Sagas.Core.Transactions;
using Stee.CAP8.MessageBus.Sagas.Messages.Messages;
using System;
using System.Collections.Generic;
using System.Text;

namespace Stee.CAP8.MessageBus.Sagas.Core.Steps
{
    public class IncomingStepContext : StepContext
    {
        /// <summary>
        /// Constructs the step context, initially stashing the given <see cref="TransportMessage"/> and <see cref="ITransactionContext"/> into its bag of objects
        /// </summary>
        public IncomingStepContext(TransportMessage message, ITransactionContext transactionContext)
        {
            Save(message);
            Save(new OriginalTransportMessage(message));
            Save(transactionContext);

            //transactionContext.Items[StepContextKey] = this;
        }
    }
}
